package com.dgshanger.sanhxiaofeisc.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.common.Constants
import com.dgshanger.sanhxiaofeisc.entity.ShopDetailsEntity
import com.dgshanger.sanhxiaofeisc.ui.home.utils.ImageLoader

/**
 * Created by JacobHHH on 2018/4/18.
 */
class ShopDetailsAdapter(layoutResId : Int,data : List<ShopDetailsEntity.RecommendGoodsBean>) : BaseQuickAdapter<ShopDetailsEntity.RecommendGoodsBean, BaseViewHolder>(layoutResId,data) {



    override fun convert(helper: BaseViewHolder?, item: ShopDetailsEntity.RecommendGoodsBean?) {
        ImageLoader.loadToUrl(mContext,helper!!.getView(R.id.iv_goods),Constants.getBaseUrl()+item!!.menu_img)
        helper.setText(R.id.tv_goods_name,item.good_name)
        helper.setText(R.id.tv_category,item.category_name)
        helper.setText(R.id.tv_intro,item.introduce)
        helper.setText(R.id.tv_price,"￥"+item.good_price)
    }


}